package com.quiz;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class Game extends Activity implements OnClickListener{

	private static final int QUESTION = 0;
	AnimePanel surface;
	LinearLayout content;
	
	Button back;
	TextView status;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.game_screen);
		
		content = (LinearLayout) findViewById(R.id.center);
        surface = new AnimePanel(this);
        content.addView(surface);
        
        status =(TextView) findViewById(R.id.status);
        status.setOnClickListener(this);
        back = (Button) findViewById(R.id.quit);
        back.setOnClickListener(this);
	}
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		if(v == back){
			finish();
		}
		if(v == status){
			Intent intent = new Intent(Game.this, Question.class);
			startActivityForResult(intent, QUESTION);
		}
	}
	
	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		// TODO Auto-generated method stub
		super.onActivityResult(requestCode, resultCode, data);
	}

}
